PATHMac OS 8 and 9 Developer Documentation > Human Interface Toolbox > Appearance Manager >

Programming With the Appearance Manager


GetThemeBrushAsColor

Obtains the color that corresponds to a given theme brush type under the current theme.

pascal OSStatus GetThemeBrushAsColor (
                     ThemeBrush inBrush,
                     SInt16 inDepth,
                     Boolean inColorDev,
                     RGBColor *outColor);
inBrush
A value of type ThemeBrush . Pass a constant specifying the theme brush type for which you wish to obtain a color; see Theme Brush Constants for descriptions of possible values.
inDepth
A signed 16-bit integer. Pass a value specifying the bit depth (in bits per pixel) of the current graphics port.
inColorDev
A value of type Boolean . Pass true to indicate that you are drawing on a color device. Pass false for a monochrome device.
outColor
A pointer to a structure of type RGBColor . On return, the structure contains a color corresponding to the color or pattern used by the specified theme brush under the current theme.
function result
A result code; see Result Codes .
DISCUSSION

The GetThemeBrushAsColor function obtains a color that corresponds to that which is in use for a specified theme brush. If, in the current theme, the specified brush draws with a pattern instead of a color, a theme-specified approximate color is obtained. Your application should call GetThemeBrushAsColor only when you must use an RGBColor value for a specific operation; typically, your application should call the functions SetThemeBackground and SetThemePen for greatest fidelity with the current theme.

VERSION NOTES

Available with Appearance Manager 1.1 and later.


© 1999 Apple Computer, Inc. – (Last Updated 29 April 99)